# -*- coding: utf-8 -*-
"""
Created on Thu Sep 12 16:33:34 2019

@author: Administrator
"""

# 1036 跟奥巴马一起编程
# python round函数增强版实现四舍五入
# 以小数点后一位为基准，实现四舍五入
# 再通过10^x，实现增加精度

# 确定行数
# 循环构造每一行后，打印

def test():
    raw = input().split(' ')
    num = int(raw[0])
    simbol = raw[1]
    
    height = int(round_adv(num / 2, 0))
    for i in range(height):
        temp = [] 
        for j in range(num):
            if i == 0 or i == (height - 1):
                temp.append(simbol)
            else:
                temp.append(' ')
        temp[0] = simbol
        temp[-1] = simbol
        print(''.join(temp))
        
    
    
def round_adv(num, precision):
    num = num * (10 ** precision)
    fraction = num - int(num)
    if fraction < 0.5:
        up = 0
    else:
        up = 1
    result = int(num) + up
    return result / (10 ** precision)

#print(round_adv(10.5, 0))
test()
